<@admin.header title="汽车基本信息">

<@common.timeselector />
<@common.validate/>
<script type="text/javascript">
    $(document).ready(function(){
		$('#mainForm').validate();
    });
</script>
<style>
</style>
</@admin.header>
<body>
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li>
                <a href="${base}/right.do">首页</a>
            </li>
            <li>
                <a href="list.do">汽车管理</a>
            </li>
            <li>
                <a href="#">
                	${entity.name!'新建汽车信息'}
                </a>
            </li>
        </ul>
    </div>
    <div class="formbody">
        <@nerve.carEditNav nav="${template!''}" />
		
		<div class="tabson">
		<form action="saveBasic.do" method="post" id="mainForm">
		<input type="hidden" name="car.id" value="${entity.id!'0'}" />
        <ul class="forminfo">
            <li>
                <label class="field">
                    	汽车品牌<b>*</b>
                </label>
				<#if entity.id == 0 || !(entity.brand)??>
				<#--调用品牌选择模板，那么本Controller需要经过brandSelectInterceptor 才能获取到数据-->
				<@nerve.brandSelect />
				<#else>
				<input name="car.brand.id" value="${entity.brand.id}" type="hidden"/>
				<input readonly="readonly" disabled="true" type="text" class="dfinput" 
					value="<#if entity.brand.parent??>${entity.brand.parent.name}&nbsp;</#if>${entity.brand.name}" 
					>
				</#if>
            </li>
            <li>
                <label class="field">
                    	具体车型<b>*</b>
                </label>
                <input name="car.name" type="text" class="dfinput" value="${entity.name!''}" validate="{required:true}" />
            </li>
			<li>
                <label class="field">
                    	类型<b>*</b>
                </label>
				<#--引用类型选择-->
				<#if entity.category??>
                <@nerve.carCategorySelect name="car.category.id" value="${entity.category.id}" class="dfinput"/>
				<#else>
				<@nerve.carCategorySelect name="car.category.id" value="0" class="dfinput" />
				</#if>
				&nbsp;
				<a href="${base}/car/category/list.do">去管理类型</a>
            </li>
			<li>
                <label class="field">
                    	别名
                </label>
                <input name="car.alias" type="text" class="dfinput" value="${entity.alias!''}"/>
				方便记忆
            </li>
			<li>
                <label class="field">
                    	归属地<b>*</b>
                </label>
                <input name="car.belong" type="text" class="dfinput" value="${entity.belong!''}" validate="{required:true}"/>
            </li>
			<li>
                <label class="field">
                    	车牌号<b>*</b>
                </label>
                <input name="car.plateNumber" type="text" class="dfinput" value="${entity.plateNumber!''}" validate="{required:true}"/>
            </li>
			<li>
                <label class="field">
                    	年份<b>*</b>
                </label>
                <input name="car.regYear" type="text" class="dfinput" value="${entity.regYear!''}"  validate="{required:true}"/>
            </li>
			<li>
                <label class="field">
                    	上牌时间
                </label>
                <input name="car.plateDate" onclick="WdatePicker();" type="text" class="dfinput" value="${entity.plateDate!''}" />
            </li>
			<li>
                <label class="field">
                   		 年检到期
                </label>
                <input name="car.checkDate" onclick="WdatePicker();" type="text" class="dfinput" value="${entity.checkDate!''}" />
            </li>
			<li>
                <label class="field">
                    	行驶里程
                </label>
                <input name="car.mileage" type="text" class="dfinput" value="${entity.mileage!''}"/>
				万公里
            </li>
			<li>
                <label class="field">
                    	本站特惠价<b>*</b>
                </label>
                <input name="car.price" type="text" class="dfinput" value="${entity.price!''}" validate="{required:true}"/>
				万元
            </li>
			<li>
                <label class="field">
                    	新车参考价
                </label>
                <input name="car.freshPrice" type="text" class="dfinput" value="${entity.freshPrice!''}" />
				万元
            </li>
			<li>
                <label class="field">
                    	本站特价车
                </label>
                <label class="field">
                	<input type="radio" name="car.specialPrice" value="1" <#if entity.specialPrice=1>checked="checked"</#if> />是
                </label>
				<label class="field">
                	<input type="radio" name="car.specialPrice" value="0" <#if entity.specialPrice!=1>checked="checked"</#if>/>否
                </label>
            </li>
			<li>
                <label class="field">
                    	车辆文字描述
                </label>
				<textarea name="car.information" style="width:100%;" rows="10">${entity.information!''}</textarea>
            </li>
            <li>
                <label class="field">
                    &nbsp;
                </label>
				<@nerve.c_save />
            </li>
        </ul>
		</form>
		</div>
	</div>
</body>
<script>
	$(document).ready(function(){
		<#if ERROR??>App.toast.error("${ERROR}");</#if>
	});
</script>
</html>